<?php

use think\facade\Route;

Route::group(function (){
    /*** 登录开始 ***/
    Route::group(function (){
        Route::rule('/admin/getCode','admin.Main/getCode');
        Route::rule('/admin/login','admin.Main/login');
    });
    /*** 登录结束 ***/

    /*** 需要登录的操作 ***/
    Route::group(function (){
        Route::rule('/admin/layout','admin.Main/layout');
        Route::rule('/admin/editPwd','admin.Main/editPwd');
        
        //配置
        Route::rule('/admin/getSettingData','admin.setting/getData');
        Route::rule('/admin/saveSettingData','admin.setting/saveData');
        
        //短信模板
        Route::rule('/admin/getSmsTplList','admin.setting/getSmsTplList');
        Route::rule('/admin/showSmsTpl','admin.setting/showSmsTpl');
        Route::rule('/admin/saveSmsTpl','admin.setting/saveSmsTpl');
        Route::rule('/admin/delSmsTpl','admin.setting/delSmsTpl');

        //首页统计数据
        Route::rule('/admin/getCountData','admin.Main/getCountData');
        Route::rule('/admin/getMiniappUseRank','admin.Main/getMiniappUseRank');
        //商户
        Route::group(function (){
            Route::rule('/admin/getAccountList','admin.Account/index');
            Route::rule('/admin/addAccount','admin.Account/addAccount');
            Route::rule('/admin/editAccount','admin.Account/editAccount');
            Route::rule('/admin/getAccountShopList','admin.Account/getAccountShopList');
        });

        //商铺
        Route::group(function (){
            Route::rule('/admin/getShopList','admin.Shop/index');
            Route::rule('/admin/showShop','admin.Shop/show');
            Route::rule('/admin/showShopStore','admin.Shop/showShopStore'); // 展示门店
            Route::rule('/admin/saveShopStore','admin.Shop/saveShopStore'); // 保存门店数量
            Route::rule('/admin/renewShop','admin.Shop/renew');
            Route::rule('/admin/delShop','admin.Shop/delShop');
            Route::rule('/admin/shop_display','admin.Shop/shopdisplay');
            Route::rule('/admin/shop_display_is','admin.Shop/shopdisplayis');
            //客服
            Route::rule('/admin/getKefuList','admin.Shop/getKefuList');
            Route::rule('/admin/showKefu','admin.Shop/showKefu');
            Route::rule('/admin/saveKefu','admin.Shop/saveKefu');
            Route::rule('/admin/delKefu','admin.Shop/delKefu');
            Route::rule('/admin/appointKefu','admin.Shop/appointKefu');
            Route::rule('/admin/defaultKefu','admin.Shop/defaultKefu');
            //支付配置
            Route::rule('/admin/showShopPayment','admin.Shop/showShopPayment');
            Route::rule('/admin/saveShopPayment','admin.Shop/saveShopPayment');
            
              //小程序免认证通道
            Route::rule('/admin/getPassagewayList','admin.Shop/getPassagewayList');
            Route::rule('/admin/savePassageway','admin.Shop/savePassageway');
        });

        //应用
        Route::group(function (){
            Route::rule('/admin/getApplianceList','admin.Appliance/index');
            Route::rule('/admin/showAppliance','admin.Appliance/show');
            Route::rule('/admin/applianceGetAccountData','admin.Appliance/getAccountData');
            Route::rule('/admin/saveAppliance','admin.Appliance/save');
             Route::rule('/admin/cloudRegister','admin.cloud/register');
            Route::rule('/admin/cloudInit','admin.cloud/initData');
            
            Route::rule('/admin/getFrameV','admin.cloud/getFrameV');
            Route::rule('/admin/getFrameFile','admin.cloud/getFrameFile');
            Route::rule('/admin/decompressionFrameFile','admin.cloud/decompressionFrameFile');
            Route::rule('/admin/moveFrameFile','admin.cloud/moveFrameFile');
            Route::rule('/admin/installFrameSql','admin.cloud/installFrameSql');
            Route::rule('/admin/overFrame','admin.cloud/overFrame');
            
            Route::rule('/admin/getPhpCodeV','admin.cloud/getPhpCodeV');
            Route::rule('/admin/getPhpCodeFile','admin.cloud/getPhpCodeFile');
            Route::rule('/admin/decompressionPhpFile','admin.cloud/decompressionPhpFile');
            Route::rule('/admin/movePhpFile','admin.cloud/movePhpFile');
            Route::rule('/admin/installPhpSql','admin.cloud/installPhpSql');
            Route::rule('/admin/overPhpUpdate','admin.cloud/overPhpUpdate');
            
            Route::rule('/admin/getMiniappV','admin.cloud/getMiniappV');
            Route::rule('/admin/planMiniappResource','admin.cloud/planMiniappResource');
            Route::rule('/admin/uploadMiniapp','admin.cloud/uploadMiniapp');
            Route::rule('/admin/overMiniapp','admin.cloud/overMiniapp');
            Route::rule('/admin/createFromDraft','admin.cloud/createFromDraft');
            //激活码
            Route::rule('/admin/generateActivationCode','admin.Appliance/generateActivationCode');
            Route::rule('/admin/getActivationCodeList','admin.Appliance/getActivationCodeList');
            Route::rule('/admin/delActivationCode','admin.Appliance/delActivationCode');
			
	   
        });
        //模版
        Route::group(function (){
            Route::rule('/admin/getTemplateList','admin.template/index');
            Route::rule('/admin/onlineTemplate','admin.template/online');
            Route::rule('/admin/delTemplate','admin.template/delete');
            Route::rule('/admin/getTemplateDetail','admin.template/show');
            Route::rule('/admin/saveTemplateDetail','admin.template/save');
        });
    })->middleware(\app\platform\middleware\AdminCheck::class);
    /*** 需要登录的操作 ***/
})->middleware(\app\platform\middleware\AdminBase::class);
